package cn.com.huzo.model.entities.trade;

import huzofw.model.entities.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 开发样品跟单记录实体类
 * <p>
 * @author 范学春
 */
public class SampleDevAttachedSheetEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -5291401654173170604L;
    private Long HeaderId;
    private String TypeOfBill;
    private String NoOfStyle;               // 款号
    private String Specification;           // 规格（品牌）
    private String ColourName;              // 颜色 
    private Integer Quantity;               // 样品数量
    private Long DesignerJp;                // 日方设计
    private String DesignerJpName;
    private Long DesignerCn;                // 中方设计
    private String DesignerCnName;
    private Long Buyer;                     // 我方采购
    private String BuyerName;
    private Long SalesRep;                  // 贸易担当
    private String SalesRepName;
    private Timestamp IssuedDate;            // 下达日期
    private Timestamp ScheduledFinishDate;   // 希望交期
    private Timestamp ActualFinishingDate;   // 完成日期
    private String Description;              // 备注

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public String getTypeOfBill() {
        return TypeOfBill;
    }

    public void setTypeOfBill(String TypeOfBill) {
        this.TypeOfBill = TypeOfBill;
    }

    public String getNoOfStyle() {
        return NoOfStyle;
    }

    public void setNoOfStyle(String NoOfStyle) {
        this.NoOfStyle = NoOfStyle;
    }

    public String getSpecification() {
        return Specification;
    }

    public void setSpecification(String Specification) {
        this.Specification = Specification;
    }

    public String getColourName() {
        return ColourName;
    }

    public void setColourName(String ColourName) {
        this.ColourName = ColourName;
    }

    public Integer getQuantity() {
        return Quantity;
    }

    public void setQuantity(Integer Quantity) {
        this.Quantity = Quantity;
    }

    public Long getDesignerJp() {
        return DesignerJp;
    }

    public void setDesignerJp(Long DesignerJp) {
        this.DesignerJp = DesignerJp;
    }

    public String getDesignerJpName() {
        return DesignerJpName;
    }

    public void setDesignerJpName(String DesignerJpName) {
        this.DesignerJpName = DesignerJpName;
    }

    public Long getDesignerCn() {
        return DesignerCn;
    }

    public void setDesignerCn(Long DesignerCn) {
        this.DesignerCn = DesignerCn;
    }

    public String getDesignerCnName() {
        return DesignerCnName;
    }

    public void setDesignerCnName(String DesignerCnName) {
        this.DesignerCnName = DesignerCnName;
    }

    public Long getBuyer() {
        return Buyer;
    }

    public void setBuyer(Long Buyer) {
        this.Buyer = Buyer;
    }

    public String getBuyerName() {
        return BuyerName;
    }

    public void setBuyerName(String BuyerName) {
        this.BuyerName = BuyerName;
    }

    public Long getSalesRep() {
        return SalesRep;
    }

    public void setSalesRep(Long SalesRep) {
        this.SalesRep = SalesRep;
    }

    public String getSalesRepName() {
        return SalesRepName;
    }

    public void setSalesRepName(String SalesRepName) {
        this.SalesRepName = SalesRepName;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getScheduledFinishDate() {
        return ScheduledFinishDate;
    }

    public void setScheduledFinishDate(Timestamp ScheduledFinishDate) {
        this.ScheduledFinishDate = ScheduledFinishDate;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getActualFinishingDate() {
        return ActualFinishingDate;
    }

    public void setActualFinishingDate(Timestamp ActualFinishingDate) {
        this.ActualFinishingDate = ActualFinishingDate;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public void setIssuedDate(Timestamp IssuedDate) {
        this.IssuedDate = IssuedDate;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getIssuedDate() {
        return IssuedDate;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof SampleDevAttachedSheetEntity)) {
            return false;
        }

        final SampleDevAttachedSheetEntity that = (SampleDevAttachedSheetEntity) o;

        return new EqualsBuilder()
                .append(this.getHeaderId(), that.getHeaderId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getHeaderId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
